/*
 * FilePath     : \src\router\navigation.ts
 * Author       : SJZ
 * Date         : 2025-03-12 19:28
 * LastEditors  : SJZ
 * LastEditTime : 2025-04-03 23:30
 * Description  : 路由导航控制
 * CodeIterationRecord:
 */

import common from "@/utils/common";
import nProgress from "nprogress";
import "nprogress/nprogress.css";
nProgress.configure({ showSpinner: false });
let win = window as any;
export default {
  set: (router: any) => {
    //导航守卫
    router.beforeEach(async (to: any, from: any, next: any) => {
      nProgress.start();
    });

    //路由切换完
    router.afterEach((to: any) => {
      nProgress.done();
    });
  }
};
